﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="ViewPage<BonsaiScrum.Mvc.Models.CreateUserModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <table>
        <tr>
            <th>ID</th>
            <th>User Name</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Level</th>
        </tr>

    <%     {
           foreach (var item in Model.Users)
           { %>
    
        <tr>
            <td>
                <%= Html.Encode(item.Id)%>
            </td>
            <td>
                <%= Html.Encode(item.UserName)%>
            </td>
            <td>
                <%= Html.Encode(item.FirstName)%>
            </td>
            <td>
                <%= Html.Encode(item.LastName)%>
            </td>
            <td>
                <%= Html.Encode(item.MaximumAuthorizedPermissionLevel.Name)%>
            </td>

            <td>
            <% if (item.MaximumAuthorizedPermissionLevel.Name == "Disabled")
               {
               
               }
               else
               {%>
                  <%= Html.ActionLink("Disable", "Disable")%>
               <%}%>
            </td>
        </tr>
    
    <% }
       } %>
       <p>Create New User: 
       <%= Html.ActionLink("Create New User", "Create")%></p>
       

    </table>


</asp:Content>
